import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Main',
    component: () => import('../views/Main.vue'),
    children: [
      {
        path: '/middle',
        alias: '',
        name: 'Middle',
        component: () => import('../views/Middle.vue'),
        children: [
          {
            path: '/home',
            alias: '',
            name: 'Home',
            component: () => import('../views/Home.vue')
          },
          {
            path: '/collection',
            name: 'Collection',
            component: () => import('../views/Collection.vue')
          },
          {
            path: '/play',
            name: 'Play',
            component: () => import('../views/Play.vue')
          },
          {
            path: '/like',
            name: 'Like',
            component: () => import('../views/Like.vue')
          },
          {
            path: '/details/:id',
            name: 'Details',
            component: () => import('../views/Details.vue')
          },
          {
            path: '/singerDetailsPage/:id',
            name: 'SingerDetailsPage',
            component: () => import('../views/SingerDetailsPage.vue')
          },
          {
            path: '/albumDetails/:id',
            name: 'AlbumDetails',
            component: () => import('../views/AlbumDetails.vue')
          },
          {
            path: '/result/:val',
            name: 'Result',
            component: () => import('../views/Result.vue')
          },
          {
            path: '/video/:id',
            name: 'Video',
            component: () => import('../views/Video.vue')
          },
          {
            path: '/videoOne/:id',
            name: 'VideoOne',
            component: () => import('../views/VideoOne.vue')
          }
        ]
      },
      {
        path: '/signIn',
        name: 'SignIn',
        component: () => import('../views/SignIn.vue'),
      },
      {
        path: '/register',
        name: 'Register',
        component: () => import('../views/Register.vue'),
      },
    ]
  },
]

const router = new VueRouter({
  routes
})

export default router
